function generateColumns(originalColumns, scheduleData) {
  // 创建日期列配置
  const dateColumns = Object.entries(scheduleData).map(
    ([scheduleId, date]) => ({
      key: `date${scheduleId}`,
      label: date,
      visible: true,
    })
  );

  // 合并原始列和日期列
  return [...originalColumns, ...dateColumns];
}

// 原始列配置
const baseColumns = [
  { key: "roleName", label: "用户", visible: true },
  { key: "role", label: "身份", visible: true },
];
const scheduleJson = {
  89968: "2025-01-28",
  89969: "2025-02-04",
  89970: "2025-02-11",
  90440: "2025-02-17",
  90454: "2025-03-03",
  90455: "2025-03-10",
};

// 生成完整列配置
const fullColumns = generateColumns(baseColumns, scheduleJson);
console.log("fullColumns", fullColumns);
/* 结果：
[
  { key: "roleName", label: "用户", visible: true },
  { key: "role", label: "身份", visible: true },
  { key: "date89968", label: "2025-01-28", visible: true },
  { key: "date89969", label: "2025-02-04", visible: true },
  { key: "date89970", label: "2025-02-11", visible: true },
  { key: "date90440", label: "2025-02-17", visible: true },
  { key: "date90454", label: "2025-03-03", visible: true },
  { key: "date90455", label: "2025-03-10", visible: true }
]
*/
